home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / CPP / WCLASS95.ZIP / VC2HD2.SCT < prev    next >
Encoding:
Text File  |  1995-09-13  |  5.5 KB  |  138 lines

  1. // Class: CLASS_NAME            Visual C++ Windows Exe
  2.  
  3. #ifndef __$CAPITALIZE_ALL$CLASS_NAME$_H  //Required for current class
  4.   #define __$CAPITALIZE_ALL$CLASS_NAME$_H
  5.  
  6. [                               //Required for base classes
  7. #ifndef __$CAPITALIZE_ALL$BASE_CLASS$_H
  8.   #include "$BASE_CLASS$.h"
  9. #endif
  10. ]                               
  11.                 
  12. [#include <INCLUDE_FILE>   //Required for include files, eg <CList.h>
  13. ]                               
  14.  
  15. [                               //Required for 1:1 associated classes
  16. #ifndef __$CAPITALIZE_ALL$ASSOCIATION_ONE_CLASS$_H
  17.   #include "$ASSOCIATION_ONE_CLASS.h"
  18. #endif
  19. ]                                                               
  20.  
  21. [                               //Required for 1:1 aggregation (part) classes
  22. #ifndef __$CAPITALIZE_ALL$AGGREGATION_ONE_CLASS$_H
  23.   #include "$AGGREGATION_ONE_CLASS$.h"
  24. #endif
  25. ]                                                               
  26.  
  27. [                               //Required for 1:M associated classes
  28. #ifndef __$CAPITALIZE_ALL$ASSOCIATION_MANY_CLASS$_H
  29.   #include "$ASSOCIATION_MANY_CLASS$.h"
  30. #endif
  31. ]                                                               
  32.  
  33. [                               //Required for 1:M aggregation (part) classes
  34. #ifndef __$CAPITALIZE_ALL$AGGREGATION_MANY_CLASS$_H
  35.   #include "$AGGREGATION_MANY_CLASS$.h"
  36. #endif
  37. ]
  38.  
  39. CLASS_USER1
  40. CLASS_USER2
  41.             
  42. class CLASS_NAME[NO_RETURN NO_REPEAT: NO_REPEAT public BASE_CLASS ,DELETE_LAST_SYMBOL] CLASS_LIBRARY_BASE_CLASS     
  43. { [ATTRIBUTE_TYPE ATTRIBUTE_NAME$;]
  44.   [ASSOCIATION_ONE_CLASS$* ASSOCIATION_ONE_NAME$;]
  45.   [AGGREGATION_ONE_CLASS AGGREGATION_ONE_NAME$;]
  46.   [CList <ASSOCIATION_MANY_CLASS, ASSOCIATION_MANY_CLASS&> ASSOCIATION_MANY_NAME;]
  47.   [CList <AGGREGATION_MANY_CLASS, AGGREGATION_MANY_CLASS&> AGGREGATION_MANY_NAME;]
  48. public:
  49.             //Default constructor
  50.             //Update to access base class attributes 
  51.             //Update to access 1:1 part class attributes 
  52.             //Update to access 1:M part class attributes
  53.             //Update to access 1:1 associated class attributes
  54.             //Update to access 1:M associated class attributes
  55.             //Ensure initial values entered
  56.   CLASS_NAME () :[NO_RETURN ATTRIBUTE_NAME(ATTRIBUTE_INITIAL_VALUE),DELETE_LAST_SYMBOL]  { } 
  57.  
  58.             //Constructor with arguments
  59.   CLASS_NAME ([NO_RETURN ATTRIBUTE_TYPE a$ATTRIBUTE_NAME,DELETE_LAST_SYMBOL] )       
  60.   : [NO_RETURN ATTRIBUTE_NAME (a$ATTRIBUTE_NAME),DELETE_LAST_SYMBOL] { }        
  61.             
  62.   
  63.             //Copy constructor
  64.             //Update to access 1:M part class attributes
  65.             //Update to access 1:1 associated class attributes
  66.             //Update to access 1:M associated class attributes      
  67.   CLASS_NAME (const CLASS_NAME$& a$CLASS_NAME ) [NO_RETURN NO_REPEAT: BASE_CLASS (a$CLASS_NAME),DELETE_LAST_SYMBOL]
  68.   { [  ATTRIBUTE_NAME = a$CLASS_NAME$.$ATTRIBUTE_NAME;]
  69.     [AGGREGATION_ONE_NAME = a$CLASS_NAME$.$AGGREGATION_ONE_NAME;]            
  70.   }                                     
  71.  
  72.             //Operator= Assignment Operator
  73.             //Update to access 1:M part class attributes
  74.             //Update to access 1:1 associated class attributes
  75.             //Update to access 1:M associated class attributes      
  76.   CLASS_NAME operator= (const CLASS_NAME$& a$CLASS_NAME)
  77.   { if (this == &a$CLASS_NAME) return *this;          
  78.   [BASE_CLASS$::operator= (a$CLASS_NAME);]
  79.   [ATTRIBUTE_NAME = a$CLASS_NAME$.$ATTRIBUTE_NAME;]
  80.   [AGGREGATION_ONE_NAME = a$CLASS_NAME$.$AGGREGATION_ONE_NAME;]      
  81.   return *this;                                                                                                 
  82.   }                                     
  83.  
  84.             //Operator== Equality Operator
  85.             //Update to access 1:M part class attributes
  86.             //Update to access 1:1 associated class attributes
  87.             //Update to access 1:M associated class attributes      
  88.   int operator== (const CLASS_NAME$& a$CLASS_NAME)
  89.   { return (
  90. [  (BASE_CLASS$::operator== (a$CLASS_NAME)) &&]
  91. [  (AGGREGATION_ONE_NAME == a$CLASS_NAME$.$AGGREGATION_ONE_NAME) &&]
  92. [  (ATTRIBUTE_NAME == a$CLASS_NAME$.ATTRIBUTE_NAME) &DELETE_LAST_SYMBOL&DELETE_LAST_SYMBOL]
  93.   );
  94.   }                             
  95.     
  96. [                       //Get accessor function for attribute
  97.   ATTRIBUTE_TYPE get$ATTRIBUTE_NAME$() const
  98.   {return ATTRIBUTE_NAME$;
  99.   }
  100. ]                       
  101.             
  102. [                       //Set accessor function for attribute
  103.   void set$ATTRIBUTE_NAME ($ATTRIBUTE_TYPE a$ATTRIBUTE_NAME$)
  104.   { ATTRIBUTE_NAME = a$ATTRIBUTE_NAME$;
  105.   }
  106. ]                       
  107.  
  108. [                       //Get accessor function for 1:1 aggregation
  109.   AGGREGATION_ONE_CLASS$& get$AGGREGATION_ONE_NAME$() 
  110.   {return AGGREGATION_ONE_NAME$;
  111.   }
  112. ]                       
  113.             
  114. [                       //Set accessor function for 1:1 aggregation
  115.   void set$AGGREGATION_ONE_NAME ($AGGREGATION_ONE_CLASS$& a$AGGREGATION_ONE_NAME$)
  116.   { AGGREGATION_ONE_NAME = a$AGGREGATION_ONE_NAME$;
  117.   }
  118. ]                       
  119.  
  120. [                       //Get accessor function for 1:1 association
  121.   ASSOCIATION_ONE_CLASS$* get$ASSOCIATION_ONE_NAME$() const
  122.   {return ASSOCIATION_ONE_NAME$;
  123.   }
  124. ]                       
  125.             
  126. [                       //Set accessor function for 1:1 association
  127.   void set$ASSOCIATION_ONE_NAME ($ASSOCIATION_ONE_CLASS$* a$ASSOCIATION_ONE_NAME$)
  128.   { ASSOCIATION_ONE_NAME = a$ASSOCIATION_ONE_NAME$;
  129.   }
  130. ]
  131.         
  132. [  CPP_OPERATION_VIRTUAL CPP_OPERATION_STATIC OPERATION_RETURN_TYPE OPERATION_NAME (CPP_OPERATION_PARAMETERS) CPP_OPERATION_CONSTANT CPP_OPERATION_PURE_VIRTUAL;
  133.  
  134.   OPERATION_CPP_VIRTUAL_BASE_CLASS ~ CLASS_NAME ( ) { }       //Destructor
  135. };
  136.  
  137. #endif